Deform Paint for Max 6.0

Deform Paint for Max 4.0
Source Code

 

Experimental Deform Paint for Max 4.0 - Tablet Support

 



This pluggin is what I define as charityware and can be freely distributed. If you find it useful make what you feel as an appropriate donation to your favorite charity. You cannot charge or make any money from this routine by reselling or bundling them with another package/cd/web page without my permission.


To install this routine just copy the files into your 3ds Max plugin directory.

This is plugin is a simple deformation system. It is an experiment in changing the way you deform a model. Right now most modifiers and programs for that fact make you deform and object by selecting points, moving them, and then selecting more points. Deform Paint is an attempt to change this and make it more like a paint program where you choose an ink and brush and then deform the mesh by painting on it. This is basically how Deform Paint works. You select an ink, there are only 3 right now, and then you set your brush type, right now there are only 3 factors that decide a brush and one is broke. You then press the Paint button and begin dragging the mouse across the mesh to deform it. This modifier is pretty much and experimental tool for me to play with so it will probably continue to grow and change as I get new ideas and more free time.

0.7 adds a cursor now when you paint and also lets it work with NURBS and patch surfaces.

0.55 adds an overall effects channel

Ink Drop Box - this determines the type of ink to use
Move Normal - moves the painted vertices along their normals
Move XY - moves the painted vertices along the sceen XY axis system
Move Z - moves the painted vertices along the sceen Z axis system
Smooth - not implemented yet
Tesselate - not implemented yet
Select Verts - works now
Select Faces - not implemented

Strength - how strong the brush is, the stronger ther brush the stronger the ink, a negative effect forces the effect to goe in the opposite direction.

Effect Radius - this is how big the brush is. This deteremines how which vertices are effected. The larger the radius the more vertices are effected.

Hardness - this is broken, it should determine how soft or hard the outer edges of the brush are. Right now any other value of 0 does some pretty strange result.

Addative - determines if the effect is addative for each stroke. If this is on everytime you go over a point in the same paint stroke the ink will be applied. If this off the a point will only be moved until it reaches maxium strength.

Total Effect - deteremines how much of the effect is applied to the mesh. At 1.0 the effect is applied as normal, at 0.0 there is no effect and at -1.0 the effect is backward. This field is animatable.

Quick Tutorial.

1. Create a grid that is 200x200 with 50 width and length segments using the grid primitive ( if you don't have the grid primitive just create a box and delete all but one side of it).

2. Apply the Deform Paint modifier to the grid.

3. Set the ink type drop list to Move Normal, set the Strength to 2.0, and Effect Radius to 30, Hardness at 0, and uncheck the Addative Strength check.

4. Hit the paint button, and in a shaded perspective view click and drag the mouse around the grid and watch the grid deform. Notice that after a while the ink effect no longer works.

5. Hit the Undo button and check the Addative Strength check box, know drag the mouse around the mesh and notice how the effect keeps layering with no limit.

6. Experiment around with different ink types.



Future Possiblities
Support Soft Selection
Bitmap for brushes
More variations of inks such as different axis systems
Some sort of drag pull system
Implement a drop window which would allow you to change brush size, strength etc.
Or use the right button as a negative strength brush
Better control and faster engine
Maybe an auto tesselate which could tesselate faces once they became to stretched
Make the Cursor the size of the area of effect
Wacom support


Bugs - lots of them
Undo does not work right for parameters, when you undo a parameter change the interface does not update
Select, Tesselate, and Smooth functions are not in yet
Hardness does not work right
It gets very sluggish on objects of more than 10K vertices.
Hardness does not work right
You have to stroke the brush for it to work, just clicking on the mesh does not do anything
The Move XY is kinda flacky


Note this utility has not been fully tested in a production enviroment so use at your own risk. If you encounter any problems please contact me at

Peter Watje